<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the TableProjectReviewByProvider class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single TableProjectReviewByProvider object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a TableProjectReviewByProviderMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 * 
	 * @package My Application
	 * @subpackage MetaControls
	 * property-read TableProjectReviewByProvider $TableProjectReviewByProvider the actual TableProjectReviewByProvider data class being edited
	 * property QLabel $IdControl
	 * property-read QLabel $IdLabel
	 * property QListBox $ProjectIdControl
	 * property-read QLabel $ProjectIdLabel
	 * property QIntegerTextBox $BuyerIdControl
	 * property-read QLabel $BuyerIdLabel
	 * property QIntegerTextBox $ProviderIdControl
	 * property-read QLabel $ProviderIdLabel
	 * property QIntegerTextBox $Rate1Control
	 * property-read QLabel $Rate1Label
	 * property QIntegerTextBox $Rate2Control
	 * property-read QLabel $Rate2Label
	 * property QIntegerTextBox $Rate3Control
	 * property-read QLabel $Rate3Label
	 * property QIntegerTextBox $Rate4Control
	 * property-read QLabel $Rate4Label
	 * property QIntegerTextBox $Rate5Control
	 * property-read QLabel $Rate5Label
	 * property QIntegerTextBox $Rate6Control
	 * property-read QLabel $Rate6Label
	 * property QFloatTextBox $RateAverageControl
	 * property-read QLabel $RateAverageLabel
	 * property QTextBox $CommentControl
	 * property-read QLabel $CommentLabel
	 * property QDateTimePicker $ReviewDateControl
	 * property-read QLabel $ReviewDateLabel
	 * property QDateTimePicker $UpdateDateControl
	 * property-read QLabel $UpdateDateLabel
	 * property QIntegerTextBox $UpdateCountControl
	 * property-read QLabel $UpdateCountLabel
	 * property QIntegerTextBox $TypeControl
	 * property-read QLabel $TypeLabel
	 * property QIntegerTextBox $StatusControl
	 * property-read QLabel $StatusLabel
	 * property QTextBox $ActiveControl
	 * property-read QLabel $ActiveLabel
	 * property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class TableProjectReviewByProviderMetaControlGen extends QBaseClass {
		// General Variables
		protected $objTableProjectReviewByProvider;
		protected $objParentObject;
		protected $strTitleVerb;
		protected $blnEditMode;

		// Controls that allow the editing of TableProjectReviewByProvider's individual data fields
		protected $lblId;
		protected $lstProject;
		protected $txtBuyerId;
		protected $txtProviderId;
		protected $txtRate1;
		protected $txtRate2;
		protected $txtRate3;
		protected $txtRate4;
		protected $txtRate5;
		protected $txtRate6;
		protected $txtRateAverage;
		protected $txtComment;
		protected $calReviewDate;
		protected $calUpdateDate;
		protected $txtUpdateCount;
		protected $txtType;
		protected $txtStatus;
		protected $txtActive;

		// Controls that allow the viewing of TableProjectReviewByProvider's individual data fields
		protected $lblProjectId;
		protected $lblBuyerId;
		protected $lblProviderId;
		protected $lblRate1;
		protected $lblRate2;
		protected $lblRate3;
		protected $lblRate4;
		protected $lblRate5;
		protected $lblRate6;
		protected $lblRateAverage;
		protected $lblComment;
		protected $lblReviewDate;
		protected $lblUpdateDate;
		protected $lblUpdateCount;
		protected $lblType;
		protected $lblStatus;
		protected $lblActive;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * TableProjectReviewByProviderMetaControl to edit a single TableProjectReviewByProvider object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single TableProjectReviewByProvider object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableProjectReviewByProviderMetaControl
		 * @param TableProjectReviewByProvider $objTableProjectReviewByProvider new or existing TableProjectReviewByProvider object
		 */
		 public function __construct($objParentObject, TableProjectReviewByProvider $objTableProjectReviewByProvider) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this TableProjectReviewByProviderMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked TableProjectReviewByProvider object
			$this->objTableProjectReviewByProvider = $objTableProjectReviewByProvider;

			// Figure out if we're Editing or Creating New
			if ($this->objTableProjectReviewByProvider->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
		 * edit, or if we are also allowed to create a new one, etc.
		 * 
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableProjectReviewByProviderMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing TableProjectReviewByProvider object creation - defaults to CreateOrEdit
 		 * @return TableProjectReviewByProviderMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objTableProjectReviewByProvider = TableProjectReviewByProvider::Load($intId);

				// TableProjectReviewByProvider was found -- return it!
				if ($objTableProjectReviewByProvider)
					return new TableProjectReviewByProviderMetaControl($objParentObject, $objTableProjectReviewByProvider);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a TableProjectReviewByProvider object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new TableProjectReviewByProviderMetaControl($objParentObject, new TableProjectReviewByProvider());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableProjectReviewByProviderMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableProjectReviewByProvider object creation - defaults to CreateOrEdit
		 * @return TableProjectReviewByProviderMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return TableProjectReviewByProviderMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableProjectReviewByProviderMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableProjectReviewByProvider object creation - defaults to CreateOrEdit
		 * @return TableProjectReviewByProviderMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return TableProjectReviewByProviderMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objTableProjectReviewByProvider->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QListBox lstProject
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstProject_Create($strControlId = null) {
			$this->lstProject = new QListBox($this->objParentObject, $strControlId);
			$this->lstProject->Name = QApplication::Translate('Project');
			$this->lstProject->Required = true;
			if (!$this->blnEditMode)
				$this->lstProject->AddItem(QApplication::Translate('- Select One -'), null);
			$objProjectArray = TableProject::LoadAll();
			if ($objProjectArray) foreach ($objProjectArray as $objProject) {
				$objListItem = new QListItem($objProject->__toString(), $objProject->Id);
				if (($this->objTableProjectReviewByProvider->Project) && ($this->objTableProjectReviewByProvider->Project->Id == $objProject->Id))
					$objListItem->Selected = true;
				$this->lstProject->AddItem($objListItem);
			}
			return $this->lstProject;
		}

		/**
		 * Create and setup QLabel lblProjectId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblProjectId_Create($strControlId = null) {
			$this->lblProjectId = new QLabel($this->objParentObject, $strControlId);
			$this->lblProjectId->Name = QApplication::Translate('Project');
			$this->lblProjectId->Text = ($this->objTableProjectReviewByProvider->Project) ? $this->objTableProjectReviewByProvider->Project->__toString() : null;
			$this->lblProjectId->Required = true;
			return $this->lblProjectId;
		}

		/**
		 * Create and setup QIntegerTextBox txtBuyerId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtBuyerId_Create($strControlId = null) {
			$this->txtBuyerId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtBuyerId->Name = QApplication::Translate('Buyer Id');
			$this->txtBuyerId->Text = $this->objTableProjectReviewByProvider->BuyerId;
			$this->txtBuyerId->Required = true;
			return $this->txtBuyerId;
		}

		/**
		 * Create and setup QLabel lblBuyerId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblBuyerId_Create($strControlId = null, $strFormat = null) {
			$this->lblBuyerId = new QLabel($this->objParentObject, $strControlId);
			$this->lblBuyerId->Name = QApplication::Translate('Buyer Id');
			$this->lblBuyerId->Text = $this->objTableProjectReviewByProvider->BuyerId;
			$this->lblBuyerId->Required = true;
			$this->lblBuyerId->Format = $strFormat;
			return $this->lblBuyerId;
		}

		/**
		 * Create and setup QIntegerTextBox txtProviderId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtProviderId_Create($strControlId = null) {
			$this->txtProviderId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtProviderId->Name = QApplication::Translate('Provider Id');
			$this->txtProviderId->Text = $this->objTableProjectReviewByProvider->ProviderId;
			$this->txtProviderId->Required = true;
			return $this->txtProviderId;
		}

		/**
		 * Create and setup QLabel lblProviderId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblProviderId_Create($strControlId = null, $strFormat = null) {
			$this->lblProviderId = new QLabel($this->objParentObject, $strControlId);
			$this->lblProviderId->Name = QApplication::Translate('Provider Id');
			$this->lblProviderId->Text = $this->objTableProjectReviewByProvider->ProviderId;
			$this->lblProviderId->Required = true;
			$this->lblProviderId->Format = $strFormat;
			return $this->lblProviderId;
		}

		/**
		 * Create and setup QIntegerTextBox txtRate1
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtRate1_Create($strControlId = null) {
			$this->txtRate1 = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtRate1->Name = QApplication::Translate('Rate 1');
			$this->txtRate1->Text = $this->objTableProjectReviewByProvider->Rate1;
			$this->txtRate1->Required = true;
			return $this->txtRate1;
		}

		/**
		 * Create and setup QLabel lblRate1
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate1_Create($strControlId = null, $strFormat = null) {
			$this->lblRate1 = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate1->Name = QApplication::Translate('Rate 1');
			$this->lblRate1->Text = $this->objTableProjectReviewByProvider->Rate1;
			$this->lblRate1->Required = true;
			$this->lblRate1->Format = $strFormat;
			return $this->lblRate1;
		}

		/**
		 * Create and setup QIntegerTextBox txtRate2
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtRate2_Create($strControlId = null) {
			$this->txtRate2 = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtRate2->Name = QApplication::Translate('Rate 2');
			$this->txtRate2->Text = $this->objTableProjectReviewByProvider->Rate2;
			$this->txtRate2->Required = true;
			return $this->txtRate2;
		}

		/**
		 * Create and setup QLabel lblRate2
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate2_Create($strControlId = null, $strFormat = null) {
			$this->lblRate2 = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate2->Name = QApplication::Translate('Rate 2');
			$this->lblRate2->Text = $this->objTableProjectReviewByProvider->Rate2;
			$this->lblRate2->Required = true;
			$this->lblRate2->Format = $strFormat;
			return $this->lblRate2;
		}

		/**
		 * Create and setup QIntegerTextBox txtRate3
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtRate3_Create($strControlId = null) {
			$this->txtRate3 = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtRate3->Name = QApplication::Translate('Rate 3');
			$this->txtRate3->Text = $this->objTableProjectReviewByProvider->Rate3;
			$this->txtRate3->Required = true;
			return $this->txtRate3;
		}

		/**
		 * Create and setup QLabel lblRate3
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate3_Create($strControlId = null, $strFormat = null) {
			$this->lblRate3 = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate3->Name = QApplication::Translate('Rate 3');
			$this->lblRate3->Text = $this->objTableProjectReviewByProvider->Rate3;
			$this->lblRate3->Required = true;
			$this->lblRate3->Format = $strFormat;
			return $this->lblRate3;
		}

		/**
		 * Create and setup QIntegerTextBox txtRate4
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtRate4_Create($strControlId = null) {
			$this->txtRate4 = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtRate4->Name = QApplication::Translate('Rate 4');
			$this->txtRate4->Text = $this->objTableProjectReviewByProvider->Rate4;
			$this->txtRate4->Required = true;
			return $this->txtRate4;
		}

		/**
		 * Create and setup QLabel lblRate4
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate4_Create($strControlId = null, $strFormat = null) {
			$this->lblRate4 = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate4->Name = QApplication::Translate('Rate 4');
			$this->lblRate4->Text = $this->objTableProjectReviewByProvider->Rate4;
			$this->lblRate4->Required = true;
			$this->lblRate4->Format = $strFormat;
			return $this->lblRate4;
		}

		/**
		 * Create and setup QIntegerTextBox txtRate5
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtRate5_Create($strControlId = null) {
			$this->txtRate5 = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtRate5->Name = QApplication::Translate('Rate 5');
			$this->txtRate5->Text = $this->objTableProjectReviewByProvider->Rate5;
			$this->txtRate5->Required = true;
			return $this->txtRate5;
		}

		/**
		 * Create and setup QLabel lblRate5
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate5_Create($strControlId = null, $strFormat = null) {
			$this->lblRate5 = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate5->Name = QApplication::Translate('Rate 5');
			$this->lblRate5->Text = $this->objTableProjectReviewByProvider->Rate5;
			$this->lblRate5->Required = true;
			$this->lblRate5->Format = $strFormat;
			return $this->lblRate5;
		}

		/**
		 * Create and setup QIntegerTextBox txtRate6
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtRate6_Create($strControlId = null) {
			$this->txtRate6 = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtRate6->Name = QApplication::Translate('Rate 6');
			$this->txtRate6->Text = $this->objTableProjectReviewByProvider->Rate6;
			$this->txtRate6->Required = true;
			return $this->txtRate6;
		}

		/**
		 * Create and setup QLabel lblRate6
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRate6_Create($strControlId = null, $strFormat = null) {
			$this->lblRate6 = new QLabel($this->objParentObject, $strControlId);
			$this->lblRate6->Name = QApplication::Translate('Rate 6');
			$this->lblRate6->Text = $this->objTableProjectReviewByProvider->Rate6;
			$this->lblRate6->Required = true;
			$this->lblRate6->Format = $strFormat;
			return $this->lblRate6;
		}

		/**
		 * Create and setup QFloatTextBox txtRateAverage
		 * @param string $strControlId optional ControlId to use
		 * @return QFloatTextBox
		 */
		public function txtRateAverage_Create($strControlId = null) {
			$this->txtRateAverage = new QFloatTextBox($this->objParentObject, $strControlId);
			$this->txtRateAverage->Name = QApplication::Translate('Rate Average');
			$this->txtRateAverage->Text = $this->objTableProjectReviewByProvider->RateAverage;
			return $this->txtRateAverage;
		}

		/**
		 * Create and setup QLabel lblRateAverage
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblRateAverage_Create($strControlId = null, $strFormat = null) {
			$this->lblRateAverage = new QLabel($this->objParentObject, $strControlId);
			$this->lblRateAverage->Name = QApplication::Translate('Rate Average');
			$this->lblRateAverage->Text = $this->objTableProjectReviewByProvider->RateAverage;
			$this->lblRateAverage->Format = $strFormat;
			return $this->lblRateAverage;
		}

		/**
		 * Create and setup QTextBox txtComment
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtComment_Create($strControlId = null) {
			$this->txtComment = new QTextBox($this->objParentObject, $strControlId);
			$this->txtComment->Name = QApplication::Translate('Comment');
			$this->txtComment->Text = $this->objTableProjectReviewByProvider->Comment;
			$this->txtComment->TextMode = QTextMode::MultiLine;
			return $this->txtComment;
		}

		/**
		 * Create and setup QLabel lblComment
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblComment_Create($strControlId = null) {
			$this->lblComment = new QLabel($this->objParentObject, $strControlId);
			$this->lblComment->Name = QApplication::Translate('Comment');
			$this->lblComment->Text = $this->objTableProjectReviewByProvider->Comment;
			return $this->lblComment;
		}

		/**
		 * Create and setup QDateTimePicker calReviewDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calReviewDate_Create($strControlId = null) {
			$this->calReviewDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calReviewDate->Name = QApplication::Translate('Review Date');
			$this->calReviewDate->DateTime = $this->objTableProjectReviewByProvider->ReviewDate;
			$this->calReviewDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calReviewDate;
		}

		/**
		 * Create and setup QLabel lblReviewDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblReviewDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblReviewDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblReviewDate->Name = QApplication::Translate('Review Date');
			$this->strReviewDateDateTimeFormat = $strDateTimeFormat;
			$this->lblReviewDate->Text = sprintf($this->objTableProjectReviewByProvider->ReviewDate) ? $this->objTableProjectReviewByProvider->ReviewDate->__toString($this->strReviewDateDateTimeFormat) : null;
			return $this->lblReviewDate;
		}

		protected $strReviewDateDateTimeFormat;


		/**
		 * Create and setup QDateTimePicker calUpdateDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calUpdateDate_Create($strControlId = null) {
			$this->calUpdateDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calUpdateDate->Name = QApplication::Translate('Update Date');
			$this->calUpdateDate->DateTime = $this->objTableProjectReviewByProvider->UpdateDate;
			$this->calUpdateDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calUpdateDate;
		}

		/**
		 * Create and setup QLabel lblUpdateDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblUpdateDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblUpdateDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblUpdateDate->Name = QApplication::Translate('Update Date');
			$this->strUpdateDateDateTimeFormat = $strDateTimeFormat;
			$this->lblUpdateDate->Text = sprintf($this->objTableProjectReviewByProvider->UpdateDate) ? $this->objTableProjectReviewByProvider->UpdateDate->__toString($this->strUpdateDateDateTimeFormat) : null;
			return $this->lblUpdateDate;
		}

		protected $strUpdateDateDateTimeFormat;


		/**
		 * Create and setup QIntegerTextBox txtUpdateCount
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtUpdateCount_Create($strControlId = null) {
			$this->txtUpdateCount = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtUpdateCount->Name = QApplication::Translate('Update Count');
			$this->txtUpdateCount->Text = $this->objTableProjectReviewByProvider->UpdateCount;
			$this->txtUpdateCount->Required = true;
			return $this->txtUpdateCount;
		}

		/**
		 * Create and setup QLabel lblUpdateCount
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblUpdateCount_Create($strControlId = null, $strFormat = null) {
			$this->lblUpdateCount = new QLabel($this->objParentObject, $strControlId);
			$this->lblUpdateCount->Name = QApplication::Translate('Update Count');
			$this->lblUpdateCount->Text = $this->objTableProjectReviewByProvider->UpdateCount;
			$this->lblUpdateCount->Required = true;
			$this->lblUpdateCount->Format = $strFormat;
			return $this->lblUpdateCount;
		}

		/**
		 * Create and setup QIntegerTextBox txtType
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtType_Create($strControlId = null) {
			$this->txtType = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtType->Name = QApplication::Translate('Type');
			$this->txtType->Text = $this->objTableProjectReviewByProvider->Type;
			$this->txtType->Required = true;
			return $this->txtType;
		}

		/**
		 * Create and setup QLabel lblType
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblType_Create($strControlId = null, $strFormat = null) {
			$this->lblType = new QLabel($this->objParentObject, $strControlId);
			$this->lblType->Name = QApplication::Translate('Type');
			$this->lblType->Text = $this->objTableProjectReviewByProvider->Type;
			$this->lblType->Required = true;
			$this->lblType->Format = $strFormat;
			return $this->lblType;
		}

		/**
		 * Create and setup QIntegerTextBox txtStatus
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtStatus_Create($strControlId = null) {
			$this->txtStatus = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtStatus->Name = QApplication::Translate('Status');
			$this->txtStatus->Text = $this->objTableProjectReviewByProvider->Status;
			$this->txtStatus->Required = true;
			return $this->txtStatus;
		}

		/**
		 * Create and setup QLabel lblStatus
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblStatus_Create($strControlId = null, $strFormat = null) {
			$this->lblStatus = new QLabel($this->objParentObject, $strControlId);
			$this->lblStatus->Name = QApplication::Translate('Status');
			$this->lblStatus->Text = $this->objTableProjectReviewByProvider->Status;
			$this->lblStatus->Required = true;
			$this->lblStatus->Format = $strFormat;
			return $this->lblStatus;
		}

		/**
		 * Create and setup QTextBox txtActive
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtActive_Create($strControlId = null) {
			$this->txtActive = new QTextBox($this->objParentObject, $strControlId);
			$this->txtActive->Name = QApplication::Translate('Active');
			$this->txtActive->Text = $this->objTableProjectReviewByProvider->Active;
			$this->txtActive->Required = true;
			$this->txtActive->MaxLength = TableProjectReviewByProvider::ActiveMaxLength;
			return $this->txtActive;
		}

		/**
		 * Create and setup QLabel lblActive
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblActive_Create($strControlId = null) {
			$this->lblActive = new QLabel($this->objParentObject, $strControlId);
			$this->lblActive->Name = QApplication::Translate('Active');
			$this->lblActive->Text = $this->objTableProjectReviewByProvider->Active;
			$this->lblActive->Required = true;
			return $this->lblActive;
		}



		/**
		 * Refresh this MetaControl with Data from the local TableProjectReviewByProvider object.
		 * @param boolean $blnReload reload TableProjectReviewByProvider from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objTableProjectReviewByProvider->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objTableProjectReviewByProvider->Id;

			if ($this->lstProject) {
					$this->lstProject->RemoveAllItems();
				if (!$this->blnEditMode)
					$this->lstProject->AddItem(QApplication::Translate('- Select One -'), null);
				$objProjectArray = TableProject::LoadAll();
				if ($objProjectArray) foreach ($objProjectArray as $objProject) {
					$objListItem = new QListItem($objProject->__toString(), $objProject->Id);
					if (($this->objTableProjectReviewByProvider->Project) && ($this->objTableProjectReviewByProvider->Project->Id == $objProject->Id))
						$objListItem->Selected = true;
					$this->lstProject->AddItem($objListItem);
				}
			}
			if ($this->lblProjectId) $this->lblProjectId->Text = ($this->objTableProjectReviewByProvider->Project) ? $this->objTableProjectReviewByProvider->Project->__toString() : null;

			if ($this->txtBuyerId) $this->txtBuyerId->Text = $this->objTableProjectReviewByProvider->BuyerId;
			if ($this->lblBuyerId) $this->lblBuyerId->Text = $this->objTableProjectReviewByProvider->BuyerId;

			if ($this->txtProviderId) $this->txtProviderId->Text = $this->objTableProjectReviewByProvider->ProviderId;
			if ($this->lblProviderId) $this->lblProviderId->Text = $this->objTableProjectReviewByProvider->ProviderId;

			if ($this->txtRate1) $this->txtRate1->Text = $this->objTableProjectReviewByProvider->Rate1;
			if ($this->lblRate1) $this->lblRate1->Text = $this->objTableProjectReviewByProvider->Rate1;

			if ($this->txtRate2) $this->txtRate2->Text = $this->objTableProjectReviewByProvider->Rate2;
			if ($this->lblRate2) $this->lblRate2->Text = $this->objTableProjectReviewByProvider->Rate2;

			if ($this->txtRate3) $this->txtRate3->Text = $this->objTableProjectReviewByProvider->Rate3;
			if ($this->lblRate3) $this->lblRate3->Text = $this->objTableProjectReviewByProvider->Rate3;

			if ($this->txtRate4) $this->txtRate4->Text = $this->objTableProjectReviewByProvider->Rate4;
			if ($this->lblRate4) $this->lblRate4->Text = $this->objTableProjectReviewByProvider->Rate4;

			if ($this->txtRate5) $this->txtRate5->Text = $this->objTableProjectReviewByProvider->Rate5;
			if ($this->lblRate5) $this->lblRate5->Text = $this->objTableProjectReviewByProvider->Rate5;

			if ($this->txtRate6) $this->txtRate6->Text = $this->objTableProjectReviewByProvider->Rate6;
			if ($this->lblRate6) $this->lblRate6->Text = $this->objTableProjectReviewByProvider->Rate6;

			if ($this->txtRateAverage) $this->txtRateAverage->Text = $this->objTableProjectReviewByProvider->RateAverage;
			if ($this->lblRateAverage) $this->lblRateAverage->Text = $this->objTableProjectReviewByProvider->RateAverage;

			if ($this->txtComment) $this->txtComment->Text = $this->objTableProjectReviewByProvider->Comment;
			if ($this->lblComment) $this->lblComment->Text = $this->objTableProjectReviewByProvider->Comment;

			if ($this->calReviewDate) $this->calReviewDate->DateTime = $this->objTableProjectReviewByProvider->ReviewDate;
			if ($this->lblReviewDate) $this->lblReviewDate->Text = sprintf($this->objTableProjectReviewByProvider->ReviewDate) ? $this->objTableProjectReviewByProvider->ReviewDate->__toString($this->strReviewDateDateTimeFormat) : null;

			if ($this->calUpdateDate) $this->calUpdateDate->DateTime = $this->objTableProjectReviewByProvider->UpdateDate;
			if ($this->lblUpdateDate) $this->lblUpdateDate->Text = sprintf($this->objTableProjectReviewByProvider->UpdateDate) ? $this->objTableProjectReviewByProvider->UpdateDate->__toString($this->strUpdateDateDateTimeFormat) : null;

			if ($this->txtUpdateCount) $this->txtUpdateCount->Text = $this->objTableProjectReviewByProvider->UpdateCount;
			if ($this->lblUpdateCount) $this->lblUpdateCount->Text = $this->objTableProjectReviewByProvider->UpdateCount;

			if ($this->txtType) $this->txtType->Text = $this->objTableProjectReviewByProvider->Type;
			if ($this->lblType) $this->lblType->Text = $this->objTableProjectReviewByProvider->Type;

			if ($this->txtStatus) $this->txtStatus->Text = $this->objTableProjectReviewByProvider->Status;
			if ($this->lblStatus) $this->lblStatus->Text = $this->objTableProjectReviewByProvider->Status;

			if ($this->txtActive) $this->txtActive->Text = $this->objTableProjectReviewByProvider->Active;
			if ($this->lblActive) $this->lblActive->Text = $this->objTableProjectReviewByProvider->Active;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC TABLEPROJECTREVIEWBYPROVIDER OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's TableProjectReviewByProvider instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveTableProjectReviewByProvider() {
			try {
				// Update any fields for controls that have been created
				if ($this->lstProject) $this->objTableProjectReviewByProvider->ProjectId = $this->lstProject->SelectedValue;
				if ($this->txtBuyerId) $this->objTableProjectReviewByProvider->BuyerId = $this->txtBuyerId->Text;
				if ($this->txtProviderId) $this->objTableProjectReviewByProvider->ProviderId = $this->txtProviderId->Text;
				if ($this->txtRate1) $this->objTableProjectReviewByProvider->Rate1 = $this->txtRate1->Text;
				if ($this->txtRate2) $this->objTableProjectReviewByProvider->Rate2 = $this->txtRate2->Text;
				if ($this->txtRate3) $this->objTableProjectReviewByProvider->Rate3 = $this->txtRate3->Text;
				if ($this->txtRate4) $this->objTableProjectReviewByProvider->Rate4 = $this->txtRate4->Text;
				if ($this->txtRate5) $this->objTableProjectReviewByProvider->Rate5 = $this->txtRate5->Text;
				if ($this->txtRate6) $this->objTableProjectReviewByProvider->Rate6 = $this->txtRate6->Text;
				if ($this->txtRateAverage) $this->objTableProjectReviewByProvider->RateAverage = $this->txtRateAverage->Text;
				if ($this->txtComment) $this->objTableProjectReviewByProvider->Comment = $this->txtComment->Text;
				if ($this->calReviewDate) $this->objTableProjectReviewByProvider->ReviewDate = $this->calReviewDate->DateTime;
				if ($this->calUpdateDate) $this->objTableProjectReviewByProvider->UpdateDate = $this->calUpdateDate->DateTime;
				if ($this->txtUpdateCount) $this->objTableProjectReviewByProvider->UpdateCount = $this->txtUpdateCount->Text;
				if ($this->txtType) $this->objTableProjectReviewByProvider->Type = $this->txtType->Text;
				if ($this->txtStatus) $this->objTableProjectReviewByProvider->Status = $this->txtStatus->Text;
				if ($this->txtActive) $this->objTableProjectReviewByProvider->Active = $this->txtActive->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the TableProjectReviewByProvider object
				$this->objTableProjectReviewByProvider->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's TableProjectReviewByProvider instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteTableProjectReviewByProvider() {
			$this->objTableProjectReviewByProvider->Delete();
		}		



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'TableProjectReviewByProvider': return $this->objTableProjectReviewByProvider;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to TableProjectReviewByProvider fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'ProjectIdControl':
					if (!$this->lstProject) return $this->lstProject_Create();
					return $this->lstProject;
				case 'ProjectIdLabel':
					if (!$this->lblProjectId) return $this->lblProjectId_Create();
					return $this->lblProjectId;
				case 'BuyerIdControl':
					if (!$this->txtBuyerId) return $this->txtBuyerId_Create();
					return $this->txtBuyerId;
				case 'BuyerIdLabel':
					if (!$this->lblBuyerId) return $this->lblBuyerId_Create();
					return $this->lblBuyerId;
				case 'ProviderIdControl':
					if (!$this->txtProviderId) return $this->txtProviderId_Create();
					return $this->txtProviderId;
				case 'ProviderIdLabel':
					if (!$this->lblProviderId) return $this->lblProviderId_Create();
					return $this->lblProviderId;
				case 'Rate1Control':
					if (!$this->txtRate1) return $this->txtRate1_Create();
					return $this->txtRate1;
				case 'Rate1Label':
					if (!$this->lblRate1) return $this->lblRate1_Create();
					return $this->lblRate1;
				case 'Rate2Control':
					if (!$this->txtRate2) return $this->txtRate2_Create();
					return $this->txtRate2;
				case 'Rate2Label':
					if (!$this->lblRate2) return $this->lblRate2_Create();
					return $this->lblRate2;
				case 'Rate3Control':
					if (!$this->txtRate3) return $this->txtRate3_Create();
					return $this->txtRate3;
				case 'Rate3Label':
					if (!$this->lblRate3) return $this->lblRate3_Create();
					return $this->lblRate3;
				case 'Rate4Control':
					if (!$this->txtRate4) return $this->txtRate4_Create();
					return $this->txtRate4;
				case 'Rate4Label':
					if (!$this->lblRate4) return $this->lblRate4_Create();
					return $this->lblRate4;
				case 'Rate5Control':
					if (!$this->txtRate5) return $this->txtRate5_Create();
					return $this->txtRate5;
				case 'Rate5Label':
					if (!$this->lblRate5) return $this->lblRate5_Create();
					return $this->lblRate5;
				case 'Rate6Control':
					if (!$this->txtRate6) return $this->txtRate6_Create();
					return $this->txtRate6;
				case 'Rate6Label':
					if (!$this->lblRate6) return $this->lblRate6_Create();
					return $this->lblRate6;
				case 'RateAverageControl':
					if (!$this->txtRateAverage) return $this->txtRateAverage_Create();
					return $this->txtRateAverage;
				case 'RateAverageLabel':
					if (!$this->lblRateAverage) return $this->lblRateAverage_Create();
					return $this->lblRateAverage;
				case 'CommentControl':
					if (!$this->txtComment) return $this->txtComment_Create();
					return $this->txtComment;
				case 'CommentLabel':
					if (!$this->lblComment) return $this->lblComment_Create();
					return $this->lblComment;
				case 'ReviewDateControl':
					if (!$this->calReviewDate) return $this->calReviewDate_Create();
					return $this->calReviewDate;
				case 'ReviewDateLabel':
					if (!$this->lblReviewDate) return $this->lblReviewDate_Create();
					return $this->lblReviewDate;
				case 'UpdateDateControl':
					if (!$this->calUpdateDate) return $this->calUpdateDate_Create();
					return $this->calUpdateDate;
				case 'UpdateDateLabel':
					if (!$this->lblUpdateDate) return $this->lblUpdateDate_Create();
					return $this->lblUpdateDate;
				case 'UpdateCountControl':
					if (!$this->txtUpdateCount) return $this->txtUpdateCount_Create();
					return $this->txtUpdateCount;
				case 'UpdateCountLabel':
					if (!$this->lblUpdateCount) return $this->lblUpdateCount_Create();
					return $this->lblUpdateCount;
				case 'TypeControl':
					if (!$this->txtType) return $this->txtType_Create();
					return $this->txtType;
				case 'TypeLabel':
					if (!$this->lblType) return $this->lblType_Create();
					return $this->lblType;
				case 'StatusControl':
					if (!$this->txtStatus) return $this->txtStatus_Create();
					return $this->txtStatus;
				case 'StatusLabel':
					if (!$this->lblStatus) return $this->lblStatus_Create();
					return $this->lblStatus;
				case 'ActiveControl':
					if (!$this->txtActive) return $this->txtActive_Create();
					return $this->txtActive;
				case 'ActiveLabel':
					if (!$this->lblActive) return $this->lblActive_Create();
					return $this->lblActive;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to TableProjectReviewByProvider fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'ProjectIdControl':
						return ($this->lstProject = QType::Cast($mixValue, 'QControl'));
					case 'BuyerIdControl':
						return ($this->txtBuyerId = QType::Cast($mixValue, 'QControl'));
					case 'ProviderIdControl':
						return ($this->txtProviderId = QType::Cast($mixValue, 'QControl'));
					case 'Rate1Control':
						return ($this->txtRate1 = QType::Cast($mixValue, 'QControl'));
					case 'Rate2Control':
						return ($this->txtRate2 = QType::Cast($mixValue, 'QControl'));
					case 'Rate3Control':
						return ($this->txtRate3 = QType::Cast($mixValue, 'QControl'));
					case 'Rate4Control':
						return ($this->txtRate4 = QType::Cast($mixValue, 'QControl'));
					case 'Rate5Control':
						return ($this->txtRate5 = QType::Cast($mixValue, 'QControl'));
					case 'Rate6Control':
						return ($this->txtRate6 = QType::Cast($mixValue, 'QControl'));
					case 'RateAverageControl':
						return ($this->txtRateAverage = QType::Cast($mixValue, 'QControl'));
					case 'CommentControl':
						return ($this->txtComment = QType::Cast($mixValue, 'QControl'));
					case 'ReviewDateControl':
						return ($this->calReviewDate = QType::Cast($mixValue, 'QControl'));
					case 'UpdateDateControl':
						return ($this->calUpdateDate = QType::Cast($mixValue, 'QControl'));
					case 'UpdateCountControl':
						return ($this->txtUpdateCount = QType::Cast($mixValue, 'QControl'));
					case 'TypeControl':
						return ($this->txtType = QType::Cast($mixValue, 'QControl'));
					case 'StatusControl':
						return ($this->txtStatus = QType::Cast($mixValue, 'QControl'));
					case 'ActiveControl':
						return ($this->txtActive = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>